ScxV6Object.Move Method
Moves a database object from its current group to another.
Parameters
- NewParentId
The identifier of the target database group where the new object is moved to.
Remarks
The Move method will attempt to move an existing database object to a different parent group.
The operation may fail if:
- The NewParentId argument does not refer to a group object.
- The user does not have configuration privileges for both the source object or the target group object.
- An existing object with the same name already exists in the target group.
- The object being moved is not allowed in the target object. For example you cannot move a template into another template.
The following example written in Visual Basic shows the Move method being used to move a point from a sub-group into the root:
' Connect to the server
Dim Svr As ScxV6DbClient.ScxV6Server
Svr = New ScxV6DbClient.ScxV6Server
Svr.Connect("MAIN", "", "")
' Find the point we wish to move
Dim Obj As ScxV6DbClient.ScxV6Object
Obj = Svr.FindObject("Group.Test Point")
' Move the point into the root
Obj.Move(Svr.RootObject.ID)
' Disconnect
Svr.Disconnect()